﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeiBoUI.ComboBoxEx
{
    #region cmb消息
    public struct ComBoItemEx
    {
        public object Value;
        public string Text;
        public int num;

        public ComBoItemEx(object value, string text)
        {
            this.Value = value;
            this.Text = text;
            this.num = 0;
        }

        public ComBoItemEx(object value, string text, int num)
        {
            this.Value = value;
            this.Text = text;
            this.num = num;
        }

        //重点是override ToString 
        public override string ToString()
        { return Text; }

        public override bool Equals(object obj)
        {
            return this.Value.Equals(obj);
        }

        public override int GetHashCode()
        {
            return this.Text.GetHashCode();
        }
    }
    #endregion
}
